864 links
  • Links Lounge
  • Home
  • Login
  • RSS Feed
  • Tag cloud
  • Picture wall
  • Daily
Links per page: 20 50 100
page 1 / 1
7 results tagged Regex x
  • REGEX et PREG - assertions avant-arrière (lookahead & lookbehind assertions) : récupérer les chaînes qui ne contiennent pas un mot particulier
    • lookahead .(?!mot)*
    Mon Feb 19 15:31:23 2018 - permalink -
    - - - http://www.lilhoot.eu/regex-et-preg-assertions-avant-arriere-lookahead-lookbehind-assertions-recuperer-les-chaines,a3
    lookahead Regex
  • regular expression - How can I use sed to replace a multi-line string? - Unix & Linux Stack Exchange

    Sed sur plusieurs lignes ? Galère.

    Sat Sep 30 11:40:40 2017 - permalink -
    - - - https://unix.stackexchange.com/questions/26284/how-can-i-use-sed-to-replace-a-multi-line-string#26290
    CommandLine Linux Regex sed
  • Comment parser du HTML avec des Regex ? | Sam |Liens de Colibri

    Ahah ! Excellent ! C'est vrai que bon... des regex pour du HTML, ce n'est peut-être pas la meilleure solution...

    Mon Jun 10 09:25:15 2013 - permalink -
    - - - http://colibri-libre.org/liens/?xv1s1Q
    Ahah PHP Regex
  • Note : regex pour matcher les balises HTML et les attributs - Le Hollandais Volant - Links Lounge - Le Hollandais Volant

    Dingue, je suis lu :D
    J'ai re-testé le script de Timo et c'est impeccable en effet ! Enfin, sur les tests que j'ai effectué. Bien joué encore !

    Fri Mar 22 17:28:53 2013 - permalink -
    - - - http://lehollandaisvolant.net/index.php?mode=links&id=20130322142853
    HTML PHP Regex Sanitize
  • Note : regex pour matcher les balises HTML et les attributs - Le Hollandais Volant

    Ah oui les regex. Toujours galère en particulier pour parser du HTML; Je me demande si Le Hollandais Volant nous montrera un exemple d'utilisation.

    Personnellement, j'ai testé son script en utilisant le code de son article comme exemple (éhéh !). J'ai quelques balises de titre qui restent, mais c'est peut-être fait exprès... ?

    <div id="main">
        <section id="midle">
            <div id="posts">
            <article class="itembloc link" id="20130322003640">
        <hgroup class="post-hgr links-hgr">
            <h2 class="link-titre"><a href="index.php?mode=links&id=20130322003640">#5292</a> - <a href="http://lehollandaisvolant.net/?mode=links&id=20130322003640">Note : regex pour matcher les balises HTML et les attributs</a></h2>
            <h3 class="link-date">Aujourd’hui à 00:36:40</h3>
        </hgroup>
        <div class="post-cnt links-cnt">
            "#<\s*/?(?:[a-zA-Z-]+)(?: (?:\s*\w+=(['\"])(?:(?!\g{1}).|(?:(?<=\\\)\g{1}))+\g{1})*(?:\s*\w*\s*))?/?>#S"<br />
    <br />
    (en php, en gros : utiliser dans un preg_replace() et les remplacer par une chaine vide agira comme striptags().)<br />
    <br />
    (oui, les attributs peuvent contenir un « > » ou un « < », par exemple en JS : « 2<=4 », et c’est chiant).<br />
    <br />
    Un peu de doc complémtentaire :<br />
    <a href="http://www.regular-expressions.info/refadv.html">http://www.regular-expressions.info/refadv.html</a><br />
    <a href="http://stackoverflow.com/questions/6050427/regex-problem-with-backreference-in-pattern-with-preg-match-all/6051114#6051114">http://stackoverflow.com/questions/6050427/regex-problem-with-backreference-in-pattern-with-preg-match-all/6051114#6051114</a> (commentaire intéressant)<br />
    <a href="http://blog.lilhoot.eu/regex-et-preg-assertions-avant-arriere-lookahead-lookbehind-assertions-recuperer-les-chaines,a3">http://blog.lilhoot.eu/regex-et-preg-assertions-avant-arriere-lookahead-lookbehind-assertions-recuperer-les-chaines,a3</a> (en français, très intéressant et très clair)
        </div>
    </article>
    </div> <!-- end postS -->

    Devient :

    <h2 class="link-titre"> #5292  -  Note : regex pour matcher les balises HTML et les attributs </h2>
    <h3 class="link-date">Aujourd’hui à 00:36:40</h3>
    
    "#<\s*/?(?:[a-zA-Z-]+)(?: (?:\s*\w+=(['\"])(?:(?!\g{1}).|(?:(?<=\\\)\g{1}))+\g{1})*(?:\s*\w*\s*))?/?>#S" 
    
    (en php, en gros : utiliser dans un preg_replace() et les remplacer par une chaine vide agira comme striptags().) 
    
    (oui, les attributs peuvent contenir un « > » ou un « < », par exemple en JS : « 2<=4 », et c’est chiant). 
    
    Un peu de doc complémtentaire : 
     http://www.regular-expressions.info/refadv.html  
     http://stackoverflow.com/questions/6050427/regex-problem-with-backreference-in-pattern-with-preg-match-all/6051114#6051114  (commentaire intéressant) 
     http://blog.lilhoot.eu/regex-et-preg-assertions-avant-arriere-lookahead-lookbehind-assertions-recuperer-les-chaines,a3  (en français, très intéressant et très clair)
    <!-- end postS -->
    Fri Mar 22 09:15:56 2013 - permalink -
    - - - http://lehollandaisvolant.net/?mode=links&id=20130322003640
    HTML PHP Regex Sanitize
  • Regexper
    Wed Mar 13 16:24:10 2013 - permalink -
    - - - http://www.regexper.com/
    Regex Tools
  • Regex Password complexity

    //Tests if the input consists of 6 or more letters, digits, underscores and hyphens.
    //The input must contain at least one upper case letter, one lower case letter and one digit.
    '\A(?=[-_a-zA-Z0-9]?[A-Z])(?=[-_a-zA-Z0-9]?[a-z])(?=[-_a-zA-Z0-9]*?[0-9])[-_a-zA-Z0-9]{6,}\z'

    Tue Jan 8 10:38:20 2013 - permalink -
    - - - http://links.la-bnbox.fr/?bCB_1Q
    Regex Security
Links per page: 20 50 100
page 1 / 1
Shaarli - The personal, minimalist, super-fast, no-database delicious clone by the Shaarli community - Help/documentation